import request from '@/utils/request'


//用户列表
export const singin = data => {
  return request({
    url:'/oa/admin/signin',
    method: 'post',
    data,
  })
}

//添加报销
export const addAdminWork = data => {
  return request({
    url:'/oa/admin/addAdminWork',
    method: 'post',
    data,
  })
}

//获取报销数据
export const getBaoXiaoList = query => {
  return request({
    url:'/oa/admin/baoXiaoList',
    method: 'get',
    params: query,
  })
}

//获取可申请的项目
export const getApplyList = query =>{
  return request({
    url:'/oa/admin/getApplyList',
    method: 'get',
    params: query,
  })
}

//是否可以申请加班,交通,物料,用车
export const isAbleApply = query => {
  return request({
    url:'/oa/admin/isAbleApply',
    method: 'get',
    params: query,
  })
}

export const getAdminDetail = query => {
  return request({
    url:'/oa/admin/baoXiaoDetail',
    method: 'get',
    params: query,
  })
}

export const editBaoXiao = data => {
  return request({
    url:'/oa/admin/baoXiaoEdit',
    method: 'post',
    data,
  })
}

//获取考勤数据
export const getLoginList = query => {
  return request({
    url:'/oa/admin/getLoginList',
    method: 'get',
    params: query,
  })
}

//获取考勤数据
export const getNoticeList = query => {
  return request({
    url:'/oa/notices',
    method: 'get',
    params: query,
  })
}

export const addNotice = data => {
  return request({
    url:'/oa/notices',
    method: 'post',
    data
  })
}

export const editNotice = data => {
  return request({
    url:`/oa/notices/${data.id}`,
    method: 'put',
    data
  })
}

export const delNotice = data => {
  return request({
    url:`/oa/notices/${data.id}`,
    method: 'delete',
    data
  })
}


